import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    TextInput,
    TouchableOpacity,
    DeviceEventEmitter,
    ScrollView
} from 'react-native';

import Constant from '../Constant/Constant'
import ScreenUtils from '../Utils/ScreenUtils'
import ColorUtils from '../Utils/ColorUtils'
import ToastUtils from '../Utils/ToastUtils'
import HttpUtils from '../Utils/HttpUtils'
import RuleUtils from '../Utils/RuleUtils'
import EncryptUtils from '../Utils/EncryptUtils'
import RouterUtils from '../Utils/RouterUtils'
import StorageUtils from '../Utils/StorageUtils'
import TimeUtils from '../Utils/TimeUtils'

export default class MessageDetail extends React.Component
{
    static navigationOptions = ({navigation}) => ({
        gesturesEnabled: false,//是否支持滑动返回收拾，iOS默认支持，安卓默认关闭
        headerTitle: '消息详情',
        headerStyle: {
            backgroundColor: ColorUtils.blue,
            height: ScreenUtils.statusBarHeight,
        },
        headerRight: (<Text></Text>),
        headerTintColor: ColorUtils.white,
        headerTitleStyle: {
            fontSize: ScreenUtils.Font_18,
            color: ColorUtils.white,
            fontWeight: 'normal',
            flex: 1,
            alignSelf: 'center',
            textAlign: 'center',
        }
    });

    constructor(props)
    {
        super(props);
        this.state = {
            pwd: ''
        };
    }

    componentDidMount()
    {
        RouterUtils.pushRouter('MessageDetail', this.props.navigation.state.key);
    }

    componentWillUnmount()
    {
        RouterUtils.popRouter('MessageDetail', this.props.navigation.state.key);
    }

    render()
    {
        return (
            <View style={styles.container}>
                <View style={{justifyContent: 'center', alignItems: 'center', marginTop: 32}}>
                    <Text style={{fontSize: ScreenUtils.Font_20, fontWeight: 'bold'}}>{this.props.navigation.state.params.title}</Text>
                </View>
                <View style={{justifyContent: 'center', alignItems: 'center', marginTop: 16, padding: 16}}>
                    <Text style={{fontSize: ScreenUtils.Font_14, lineHeight: 28}}>{this.props.navigation.state.params.content}</Text>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: ColorUtils.bgColor,
    },
});


